/*
 * @Author: 林子卓 2297304135@qq.com
 * @Date: 2023-11-17 09:06:48
 * @LastEditors: 林子卓 2297304135@qq.com
 * @LastEditTime: 2023-11-17 09:06:48
 * @FilePath: /process_pool/Task.hpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include <iostream>
#include <functional>
#include <vector>


void task1()
{
	std::cout << "LOL 野怪刷新成功!\n";
}

void task2()
{
	std::cout << "LOL 人物血条更新成功!\n";
}

void task3()
{
	std::cout << "LOL 地图视野更新成功!\n";
}

void task4()
{
	std::cout << "LOL 金币资源刷新!\n";
}

class Task_list
{
private:
	std::vector<std::function<void()>> task;
public:
	Task_list()
	{
		task.push_back(std::function<void()>(task1));
		task.push_back(std::function<void()>(task2));
		task.push_back(std::function<void()>(task3));
		task.push_back(std::function<void()>(task4));
	}
	size_t size() const { return task.size(); }
	const std::function<void()>& operator[](size_t pos) { return task[pos]; } 
	void EnumPrint()
	{
		std::cout << "###############################\n";
		std::cout << "##  1. 野怪刷新   2. 血条更新  ##\n";
		std::cout << "##  3. 视野更新   4. 金币更新  ##\n";
		std::cout << "##         else. 退出         ##\n";
		std::cout << "###############################\n";
	}
};
